package com.zyf.project.kvdb.protocol.proto.wal.impl;

import com.zyf.project.kvdb.protocol.proto.wal.KV;

/**
 * @author Zhou Yifan
 */
public class KVItem implements KV {

    private final byte[] key;
    private final byte[] value;

    public KVItem(byte[] key, byte[] value) {
        this.key = key;
        this.value = value;
    }

    /**
     * 获取键
     *
     * @return 字节数组
     */
    @Override
    public byte[] getKey() {
        return key;
    }

    /**
     * 获取值
     *
     * @return 字节数组
     */
    @Override
    public byte[] getValue() {
        return value;
    }
}
